/*
 * Created on 28/02/2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.potiorb.orb.giop;

import java.io.Serializable;

public final class ReplyStatusType implements Serializable
{
	public static final int _NO_EXCEPTION = 0;

	public static final int _USER_EXCEPTION = 1;

	public static final int _SYSTEM_EXCEPTION = 2;

	public static final int _LOCATION_FORWARD = 3;

	public static final ReplyStatusType NO_EXCEPTION =
		new ReplyStatusType(_NO_EXCEPTION);

	public static final ReplyStatusType USER_EXCEPTION =
		new ReplyStatusType(_USER_EXCEPTION);

	public static final ReplyStatusType SYSTEM_EXCEPTION =
		new ReplyStatusType(_SYSTEM_EXCEPTION);

	public static final ReplyStatusType LOCATION_FORWARD =
		new ReplyStatusType(_LOCATION_FORWARD);

	private ReplyStatusType(int v) {
		value = v;
	}

	private int value;

	public int value() {
		return value;
	}

	public static ReplyStatusType type(int v)
	{
		switch(v) {
		default:


		case _NO_EXCEPTION:
			return ReplyStatusType.NO_EXCEPTION;

		case _USER_EXCEPTION:
			return ReplyStatusType.USER_EXCEPTION;

		case _SYSTEM_EXCEPTION:
			return ReplyStatusType.SYSTEM_EXCEPTION;

		case _LOCATION_FORWARD:
			return ReplyStatusType.LOCATION_FORWARD;
		}
	}

	public String toString() {
		String[] types = {"NO_EXCEPTION",
				"USER_EXCEPTION",
				"SYSTEM_EXCEPTION",
				"LOCATION_FORWARD",};
		return types[value];
	}
}
